#include <stdio.h>
void NONO();
void fun(int x[], int n)
{
	int i=0;
	for(i=0;i<n;i++)
	{
		if(i%2==0)
		{
			x[i]=x[i]%2;
		}
		else
		{
			x[i]=x[i]%3;
		}
	}
}

int main()
{  
  int x[] = {11, 24, 16, 79, 60, 2};
  int i;
  fun(x, 6);
  for(i=0;i<6;i++)
	  printf("%d,",x[i]);
  NONO();
  return 0;
}

void NONO()
{
	FILE *fp=fopen("in.dat", "r");
	FILE *fw=fopen("out.dat", "w");
	int a[200];
	int i=0,b;

	while(!feof(fp)) {
		fscanf(fp,"%d",&b);
		for(i=0;i<b;i++)
			fscanf(fp,"%d",&a[i]);
		fun(a, b);
		for(i=0;i<b;i++)
			fprintf(fw,"%d ",a[i]);
		fprintf(fw,"\n");
		}
	fclose(fp);
	fclose(fw);
}